package com.ftp;

import com.ftp.utils.FtpUtils;

/**
 * 测试
 */
public class Client {
    public static void main(String[] args) {
//        FtpUtils.uploadFile("/", System.currentTimeMillis() + "windows_x64.zip", "D://windows_x64.zip");
//        FtpUtils.downloadFile("ftpFile/data", "windows_x64.zip", "D://abc//");
//        FtpUtils.deleteFile("ftpFile/data", "windows_x64.zip");

        //多线程上传
        for (int i = 0; i < 50; i++) {
            Thread thread = new Thread(new Runnable() {
                public void run() {
                    FtpUtils.uploadFile("/", System.currentTimeMillis() + "windows_x64.zip", "D://windows_x64.zip");
                }
            });
            thread.start();
            try {
                //睡一秒
                Thread.sleep(15);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    }
}
